Tack.Action.ShowText = new Class({
	Extends: Tack.Action,

	args: { text: 'longtext' },
	type: 'ShowText',

	initialize: function (text) {
		this.text = text;
	},

	execute: function (player) {
		if (!this.text || $type(this.text) != 'string')
			throw 'Text must be a non-empty string.';

		player.write(this.text, 'game-text');
	}
});
